const express = require('express');

const app = express();

app.use(express.static('./dist'));

app.use((err, req, res, next) => {
  const log = Log(req);

  res.status(500).json({
    status: 1,
    message: '服务器错误',
  });
  next();
});

app.use((req, res) => {
  res.sendfile('./index.html');
});

const server = app.listen(8008, () => {
  const host = server.address().address;

  console.log(`smzc_wap服务启动，地址为${host},端口为8008`);
});
